package com.ontheroad.together.service;

import cn.modoumama.service.base.BaseService;
import com.ontheroad.api.request.TogetherRequest;
import com.ontheroad.api.request.TogetherRequest.publish;
import com.ontheroad.api.response.Response;
import com.ontheroad.api.response.TogetherResponse;
import com.ontheroad.core.annotation.ValidateGroup;
import com.ontheroad.together.model.TogetherModel;
import org.springframework.remoting.service.annotation.RemoteService;

import java.util.List;

/**
 * Created by Administrator on 2017/10/23.
 */
@RemoteService
public interface TogetherService extends BaseService<TogetherModel, Integer> {

    /**
     * 发布约伴
     *
     * @param request
     * @return
     */
    @ValidateGroup(groups = publish.class)
    Response publish(TogetherRequest request) throws Exception;

    /**
     * 约伴列表
     *
     * @param request
     * @return
     * @throws Exception
     */
    Response list(TogetherRequest request) throws Exception;

    /**
     * 约伴详情
     *
     * @param request
     * @return
     * @throws Exception
     */
    Response detail(TogetherRequest request) throws Exception;

    /**
     * 约伴评论
     *
     * @param request
     * @return
     * @throws Exception
     */
    Response comment(TogetherRequest request) throws Exception;

    /**
     * 我的约伴
     *
     * @param request
     * @return
     * @throws Exception
     */
    Response myTogether(TogetherRequest request) throws Exception;

    /**
     * 删除约伴
     *
     * @param request
     * @return
     * @throws Exception
     */
    Response delete(TogetherRequest request) throws Exception;

    List<TogetherResponse> convertList(List<TogetherModel> list) throws Exception;
}
